{% block sw_order_create_options %}
<div class="sw-order-create-options">
    {% block sw_order_create_options_container %}
    {% block sw_order_create_options_order %}
    {% block sw_order_create_options_order_headline %}
    <h3 class="sw-order-create-options__headline">
        {{ $tc('sw-order.initialModal.options.textHeadlineOrder') }}
    </h3>
    {% endblock %}

    {% block sw_order_create_options_order_switch_disable_auto_promotion %}

    <mt-switch
        class="sw-order-create-options__disable-auto-promotion"
        :model-value="disabledAutoPromotion"
        :label="$tc('sw-order.createBase.labelToggleAutomaticPromotions')"
        @update:model-value="onToggleAutoPromotion"
    />
    {% endblock %}

    {% block sw_order_create_options_order_field_container %}
    <sw-container
        class="sw-order-create-options__order-container"
        gap="0px 32px"
        columns="1fr 1fr"
    >
        {% block sw_order_create_options_order_language %}
        <sw-entity-single-select
            v-model:value="context.languageId"
            entity="language"
            class="sw-order-create-options__order-language"
            :criteria="salesChannelCriteria"
            :label="$tc('sw-order.createBase.labelOrderLanguage')"
            :placeholder="$tc('sw-order.createBase.placeholderOrderLanguage')"
            show-clearable-button
        />
        {% endblock %}

        {% block sw_order_create_options_promotions %}
        <sw-multi-tag-select
            class="sw-order-create-options__promotion-code"
            :value="promotionCodes"
            :label="$tc('sw-order.createBase.labelPromotions')"
            :validate="validatePromotions"
            @update:value="changePromotionCodes"
        >
            <template #message-add-data>
                <span>{{ $tc('sw-order.initialModal.options.placeholderAddPromotion') }}</span>
            </template>
            <template #message-enter-valid-data>
                <span>{{ $tc('sw-order.createBase.placeholderAddPromotion') }}</span>
            </template>
        </sw-multi-tag-select>
        {% endblock %}
    </sw-container>
    {% endblock %}
    {% endblock %}

    {% block sw_order_create_options_payment %}
    {% block sw_order_create_options_payment_headline %}
    <h3>{{ $tc('sw-order.initialModal.options.textHeadlinePayment') }}</h3>
    {% endblock %}

    {% block sw_order_create_options_payment_container %}
    <sw-container
        class="sw-order-create-options__payment-container"
        gap="0px 32px"
        columns="1fr 1fr"
    >
        {% block sw_order_create_options_payment_method %}
        <sw-entity-single-select
            v-model:value="context.paymentMethodId"
            entity="payment_method"
            label-property="distinguishableName"
            class="sw-order-create-options__payment-method"
            :criteria="paymentMethodCriteria"
            :label="$tc('sw-order.createBase.labelPaymentMethod')"
            :placeholder="$tc('sw-order.createBase.placeholderPaymentMethod')"
            show-clearable-button
        />
        {% endblock %}

        {% block sw_order_create_options_billing_address %}
        <sw-order-customer-address-select
            v-model:value="context.billingAddressId"
            class="sw-order-create-options__billing-address"
            :label="$tc('sw-order.createBase.labelBillingAddress')"
            :placeholder="$tc('sw-order.createBase.placeholderBillingAddress')"
            :same-address-value="context.shippingAddressId"
            :customer="customer"
        />
        {% endblock %}

        {% block sw_order_create_options_order_currency %}
        <sw-entity-single-select
            v-model:value="context.currencyId"
            class="sw-order-create-options__currency-select"
            entity="currency"
            :criteria="salesChannelCriteria"
            :label="$tc('sw-order.createBase.labelCurrency')"
            :placeholder="$tc('sw-order.createBase.placeholderCurrency')"
            show-clearable-button
        />
        {% endblock %}
    </sw-container>
    {% endblock %}
    {% endblock %}

    {% block sw_order_create_options_shipment %}
    {% block sw_order_create_options_shipment_headline %}
    <h3>{{ $tc('sw-order.initialModal.options.textHeadlineShipment') }}</h3>
    {% endblock %}

    <sw-container
        class="sw-order-create-options__shipping-container"
        gap="0px 32px"
        columns="1fr 1fr"
    >
        {% block sw_order_create_options_shipping_method %}
        <sw-entity-single-select
            v-model:value="context.shippingMethodId"
            class="sw-order-create-options__shipping-method"
            entity="shipping_method"
            show-clearable-button
            :criteria="shippingMethodCriteria"
            :label="$tc('sw-order.createBase.labelShippingMethod')"
            :placeholder="$tc('sw-order.createBase.placeholderShippingMethod')"
        />
        {% endblock %}

        <mt-number-field
            v-model="shippingCost"
            class="sw-order-create-options__shipping-cost"
            :label="$tc('sw-order.initialModal.options.labelShippingCosts')"
            :step="1"
            :min="0"
            @update:model-value="onChangeShippingCost"
        >
            <template #suffix>
                {{ currency.symbol }}
            </template>
        </mt-number-field>

        <mt-switch
            v-model="isSameAsBillingAddress"
            name="sw-field--isSameAsBillingAddress"
            :label="$tc('sw-order.initialModal.options.labelSameAsBillingAddress')"
        />

        {% block sw_order_create_options_shipping_address %}
        <sw-order-customer-address-select
            v-model:value="context.shippingAddressId"
            class="sw-order-create-options__shipping-address"
            :label="$tc('sw-order.createBase.labelShippingAddress')"
            :placeholder="$tc('sw-order.createBase.placeholderShippingAddress')"
            :same-address-label="$tc('sw-order.initialModal.options.textSameAsBillingAddress')"
            :same-address-value="context.billingAddressId"
            :customer="customer"
            :disabled="isSameAsBillingAddress"
        />
        {% endblock %}
    </sw-container>
    {% endblock %}
    {% endblock %}
</div>
{% endblock %}
